package com.mm.service;

import com.mm.exception.ServiceException;
import com.mm.model.Order;

/**
 * 订单service
 *
 * @date 2018/7/19 15:50
 */
public interface OrderService {
	/**
	 * 保存订单
	 *
	 * @param order Order
	 */
	void saveOrder(Order order);

	/**
	 * 更新订单
	 *
	 * @param order Order
	 */
	void updateOrder(Order order);

	/**
	 * 获取订单
	 *
	 * @param orderId 订单ID
	 * @return Order
	 * @throws ServiceException
	 */
	Order getOneOrderById(Long orderId) throws ServiceException;

	/**
	 * 通过订单ID删除订单
	 *
	 * @param orderId 订单ID
	 * @throws ServiceException
	 */
	void deleteOrderById(Long orderId) throws ServiceException;
}
